package org.ghost.akka.common.model;

import org.ghost.akka.common.em.ResponseEnum;

import java.io.Serializable;

/**
 * 任务结果
 */
public class JobResult implements Serializable {
    private ResponseEnum response;
    private Object result;

    public JobResult(ResponseEnum response) {
        this(response, null);
    }

    public JobResult(ResponseEnum response, Object result) {
        this.response = response;
        this.result = result;
    }

    public ResponseEnum getResponse() {
        return response;
    }

    public void setResponse(ResponseEnum response) {
        this.response = response;
    }

    public Object getResult() {
        return result;
    }

    public void setResult(Object result) {
        this.result = result;
    }

    @Override
    public String toString() {
        return "JobResult{" +
                "response=" + response +
                ", result=" + result +
                '}';
    }
}
